	<?php
			$curPageName=curPageName();
		?>
	<ul id="css3menu1" class="topmenu">
		<li class="topfirst"><a <?php if($curPageName == 'index.php') echo 'class="pressed"'; ?> href="index.php" style="height:15px;line-height:15px;"><?php echo $lang['MENU_HOME']; ?></a></li>
		<li class="topmenu"><a <?php if($curPageName == 'product.php' || strpos($curPageName, "product")== 'product') echo 'class="pressed"'; ?> href="product.php" style="height:15px;line-height:15px;"><span><?php echo $lang['MENU_OUR_PRODUCTS']; ?></span></a>
			<ul class="sub">
				<?php
					$Qcategory= "SELECT *  from category order by name";
					$Ccategory = $db->sql_total($Qcategory);
					$Rcategory = $db->sql_fetch($Qcategory);
					
					foreach($Rcategory as $row){
						?>
						<li>
							<a href="#"><span><?php echo ucfirst(strtolower($row['name'])); ?></span></a>
						<?php
						$Qitem= "SELECT * from item where category_id = '$row[id]'";
						$Citem = $db->sql_total($Qitem);
						$Ritem = $db->sql_fetch($Qitem);
						if($Citem <> 0){
							echo "<ul class='sub'>";
							foreach($Ritem as $i){
								?>
									<li><a href="product_detail.php?id=<?php echo $i['id'] ?>"><?php echo $i['name']; ?></a></li>
								<?php
							}
							echo "</ul>";
						echo "</li>";
						
						}else{
						echo "</li>";
						}
					}
				?>
			</ul>
		</li>
		<li class="topmenu"><a <?php if($curPageName == 'aboutus.php') echo 'class="pressed"'; ?> href="aboutus.php" style="height:15px;line-height:15px;"><?php echo $lang['MENU_ABOUT_US']; ?></a></li>
		<li class="topmenu"><a <?php if($curPageName == 'testimoni.php') echo 'class="pressed"'; ?> href="testimoni.php" style="height:15px;line-height:15px;"><?php echo $lang['MENU_TESTIMONI']; ?></a></li>
		<li class="toplast"><a <?php if($curPageName == 'contactus.php') echo 'class="pressed"'; ?> href="contactus.php" style="height:15px;line-height:15px;"><?php echo $lang['MENU_CONTACT_US']; ?></a></li>
	</ul>
